//
//  UUDriverManager.h
//  UUCharterSupplier
//
//  Created by ZhangAo on 23/01/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import <UUFoundation/DKBaseManager.h>
#import "UUDriverModel.h"

@protocol UUDriverManagerProtocol

- (void)driverManagerDidUpdateDrivers;

@optional

- (void)driverManagerDidDeleteDrivers:(NSArray<NSNumber *> *)drivers;

@end

#define GetDriverManager()      ([UUDriverManager sharedInstance])

@interface UUDriverManager : DKBaseManager

- (void)asyncUpdateDrivers;

- (NSArray<NSNumber *> *)fetchDrivers;

- (NSArray<NSNumber *> *)fetchDriversForFleetId:(NSNumber *)fleetId;

- (UUDriverModel *)fetchDriverWithDriverId:(id)driverId;

- (void)asyncDeleteDriverWithDriverId:(NSNumber *)driverId completeBlock:(void (^)(NSError *error))completeBlock;

- (void)addDriverWithFleetId:(NSNumber *)fleetId
                        name:(NSString *)name
                      mobile:(NSString *)mobile
               completeBlock:(void (^)(NSError *error))completeBlock;

- (void)updateDriverWithDriverId:(id)driverId
                         fleetId:(NSNumber *)fleetId
                            name:(NSString *)name
                          mobile:(NSString *)mobile
                   completeBlock:(void (^)(NSError *error))completeBlock;

@end
